<script type="text/javascript">
document.observe('dom:loaded', function() { //When the page is loaded, execute this
new Autocompleter.Local('location', 'location_suggestions','[<%=$locations -%>]'); //follows the constructor. Since no options are specified, default values will be taken.

});
</script>
<div class="listings-container">
	<div class="refine-search-results">
    	<%if @token!=1%>
          <%=render :partial=>"left_filters" -%>
          <%end -%>
        </div>



<%#=@tom%>


  <div class="listings-center-column">
        <div class="listings-search">
            <% form_tag url_for(:action => "city", :city=> params[:city],:category => params[:category],:search=>"True")  do -%>
        	<div class="listings-search-title">
            	Find <%if @category%><%= h @category.name %><%else %><%end -%>
            </div>
            <div class="search-field-two">
            	<div class="search-field-name">
                	Keyword:
                </div>
                <div class="search-field-input">
                  <input type="text" name="keyword" maxlength="40" class="listing-input-boxes" value=<%if params[:keyword]%>"<%= CGI::unescape(CGI::escape(params[:keyword]))-%>"<%else%>"IT, Developer, Finance etc."<%end -%> onfocus="if (this.value=='IT, Developer, Finance etc.'){this.value='';}"/>
                </div>
            </div>
            <div class="search-field-three">
            	<div class="search-field-name">
                	Locations:
                </div>
                <div class="search-field-input">
                	<input type="text" name="location" id="location"  value=<%if params[:location]%>"<%= CGI::unescape(CGI::escape(params[:location]))-%>"<%else%>"eg. Delhi, Mumbai"<%end -%> class="listing-input-boxes" onfocus="if (this.value=='eg. Delhi, Mumbai'){this.value='';}"/>
                        <div id="location_suggestions"><!-- container for list of probable suggestions !--></div>
                </div>
            </div>
            <div class="listings-search-button">
               <%=image_submit_tag "search-button.jpg",:height=>"25px",:onSubmit => "this.href +='?location='+encodeURIComponent($F('location')); return true"
 -%>
            </div>
                <%end -%>
    	</div>

    	<div id="listings-search-results">
        	<%= render :partial=>"advertisments" %>

        </div>
    </div>
    <div class="listings-right-column">
    	<div class="post-a-free-ad">
             <%=image_tag "post-free-ad.png",:alt=>"Post Free Ad",:border=>"0px" -%>
        </div>
    	<div class="subscribe-email">
 	       <div class="subscribe-text">
           	Subscribe by Email
           </div>
           <div class="subscribe-value">
               <input type="text" class="subscribe-input" value="E-mail I.D."/>
           </div>
           <div class="subscribe-button">
	         <%=image_tag "subscribe-button.jpg",:alt=>"Subscribe",:border=>"0px" -%>
        	</div>
        </div>
        <div class="google-adsense">
         <%=image_tag "google-adsense.jpg",:width=>"150px",:height=>"562px",:border=>"0px" -%>
        </div>
        </div>
    </div>
